package com.websuites.dao;

import com.websuites.core.context.SpringBeanConnector;
import com.websuites.core.context.SpringContextHelper;

public class MybatisDaoFactory extends DaoFactory {  
	
	@Override
	public Dao getDaoImpl() {
		  //return new MybatisDaoImpl();
		 if(this.isWebSuitesDaoImplement){
			 return (Dao)SpringContextHelper.getBean("mybatisDaoImpl");
		 }else{
			 return (Dao)SpringBeanConnector.getBean("mybatisDaoImpl");
		 }
	}
	
	private boolean isWebSuitesDaoImplement = true;
	
	
	public MybatisDaoFactory(boolean isWebSuitesDaoImplement){
		this.isWebSuitesDaoImplement = isWebSuitesDaoImplement;
	}
}  